package com.ssm.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ssm.common.BaseController;
import com.ssm.entity.UserEntity;
import com.ssm.service.UserService;
import com.ssm.util.UUIDUtil;

@Controller
public class LoginController extends BaseController{
	
	@Autowired
	private UserService userService;
	
    /**
     * 进入初始页面
     * @param model
     * @return
     */
    @RequestMapping("/")
    public String toBack() {
    	UserEntity user = new UserEntity();
    	user.setId(UUIDUtil.uuid());
    	user.setUsername("admin");
    	user.setPassword("123456");
    	userService.addEntrity(user);
        return "back/login";
    }
}
